import request from '../utils/request'

/**
 * 获取添加订单信息
 */
export function orderAdd (params) {
  return request.post('/order/add', params)
}

/**
 * 获取确认订单的数据列表
 */
export function confirmOrderInfo (params) {
  return request.post('/order/confirmOrderInfo', params)
}

/**
 * 添加地址
 */
export function addressAdd (params) {
  return request.post('/address/add', params)
}

/**
 * 更新订单地址
 */
export function updateOrderAddress (params) {
  return request.post('/order/updateAddress', params)
}

/**
 * 获取默认地址
 */
export function getDefaultAddress (params) {
  return request.post('/address/defaultAddress', params)
}

/**
 * 获取地址列表
 */
export function getAddresslist (params) {
  return request.post('/address/addresslist', params)
}

/**
 * 修改默认地址
 */
export function updateDefaultAddress (params) {
  return request.post('/address/addressdefaultupdate', params)
}

/**
 * 去支付删除购物车数量
 */
export function deleteCartData (params) {
  return request.post('/order/deleteCartData', params)
}

/**
 * 支付
 */
export function pay (params) {
  return request.get('/pay/payment', { params })
}
